package com.henghai.zhenxuan.data.api;

import androidx.annotation.NonNull;

import com.henghai.zhenxuan.data.bean.ConsigneeRepositoryBean;
import com.hjq.http.config.IRequestApi;
import com.hjq.http.config.IRequestType;
import com.hjq.http.model.BodyType;

public class UpdateConsigneeInfoApi implements IRequestApi, IRequestType {

    private int id;
    private String consigneeName;
    private String consigneePhone;
    private String consigneeRegion;
    private String consigneeAddress;
    private String isDefault;


    @NonNull
    @Override
    public String getApi() {
        return "/system/user/updateConsigneeInfo";
    }

    public UpdateConsigneeInfoApi(ConsigneeRepositoryBean bean) {
        this.id = bean.getId();
        this.consigneeName = bean.getConsigneeName();
        this.consigneePhone = bean.getConsigneePhone();
        this.consigneeRegion = bean.getConsigneeRegion();
        this.consigneeAddress = bean.getConsigneeAddress();
        this.isDefault = bean.getIsDefault();
    }

    @NonNull
    @Override
    public BodyType getBodyType() {
        return BodyType.JSON;
    }
}
